/*
* @Author: Srain
* @Date:   2018-07-27 15:26:43
* @Last Modified by:   Srain 
* @Last Modified time: 2018-10-04 21:16:23
*/


'use strict';
require('page/common/nav/index.js');

var navSide         = require('page/common/nav-side/index.js');
var _mm             = require('util/mm.js');
var _group          = require('service/group-service.js');
var Pagination      = require('util/pagination/index.js');
var templateIndex   = require('./index.string');

// page 逻辑部分
var page = {
    init: function(){
        this.onLoad();
    },
    onLoad : function(){
        // 初始化左侧菜单
        navSide.init({
            name: 'user-group'
        });
        // 加载团体信息
        this.loadList();
    },
    // 加载团体信息
    loadList : function(){
        var userHtml = '';
        _group.getGroupInfo(function(res){
            userHtml = _mm.renderHtml(templateIndex, res);
            $('.panel-body').html(userHtml);
        }, function(errMsg){
            _mm.errorTips(errMsg);
        });
    }
};
$(function(){
    page.init();
});